<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>家庭记账小助手</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
    <link rel="stylesheet" type="text/css" href="resource/css/alogin.css" />
	<script type='text/javascript' src='resource/js/md5.js'></script>
	<script type='text/javascript' src='resource/js/jquery-1.9.1.min.js'></script>
  </head>
  
<body>
	<div class="Main">
	<form action="<%=basePath%>UserAction" method="post">
		<ul>
			<li class="top"></li>
			<li class="top2"></li>
			<li class="topA"></li>
			<li class="topB"><span><img src="<%=basePath%>resource/img/login/loadLoGo.png" width="272px" height="122px" alt="" style="" /></span></li>
			<li class="topC"></li>
			<li class="topD">
				<ul class="login">
					<li><span class="left">用户名：</span> <span style="left">
						<input id="userName" name="userName" type="text" class="txt" />
					 	<input type="hidden" name="op" value="LO">
					</span></li>
					<li><span class="left">密 码：</span> <span style="left">
					   <input id="passwd" name="passwd" type="password" class="txt" />  
					</span></li>
					<li>
						<span class="left">验证码：</span> 
						<span style="left" >
							<input id="yzm" name="yzm" type="text" class="txtCode" /></span> 
						<span class="left" >
							<img  style="padding-left: 14px;margin-top: 3px;border-radius:5px;" id="code" height="28px" alt="验证码" title="点击刷新验证码" class="yzm" 
		            			src="<%=request.getContextPath() %>/yzm.jsp" 
		            			onclick="refresh_yzm('code','<%=request.getContextPath() %>/yzm.jsp');return false;" />
							 
						</span>
					</li>
					<li>
						<span class="left">记住我：</span>
						<input id="Checkbox1" type="checkbox" />
					</li>
				</ul>
			</li>
			<li class="topE"></li>
			<li class="middle_A"></li>
			<li class="middle_B"></li>
			<li class="middle_C">
				<span class="btn">
					<input type="submit" value="" onclick="return validate();" style="border-radius: 0.3rem;width:105px;height:38px;border:none;background:url(<%=basePath%>resource/img/login/btnlogin.gif) no-repeat center;">
				</span>
			</li>
			<li class="middle_D"></li>
			<li class="bottom_A"></li>
			<li class="bottom_B">
			家庭记账小助手
			</li>
		</ul>
	</form>
	</div>
<script type="text/javascript">
function validate(){
	var userName = $("#userName").val();
	var passwd = $("#passwd").val();
	if(userName == ''){
		alert("用户名不能为空！");
		return false;
	}
	if(passwd == ''){
		alert("密码不能为空！");
		return false;
	}
	$("#passwd").val(hex_md5(passwd));
}
</script>  
</body>
</html>